﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using nvn.Library.Patterns;
using Hutech.CRM.Library.Models.Entities;

namespace Hutech.CRM.Web.Page
{
    public partial class MangeListCustomerPage : System.Web.UI.Page
    {
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);
            this.SearchCustomerControl1.TranferData += new EventHandler<OneParameterEventAgrs<SearchEntity>>(SearchCustomerControl1_TranferData);
            this.ListCustomersControl1.ReloadData += new EventHandler(ListCustomersControl1_ReloadData);
        }

        protected void Page_Load(object sender, EventArgs e)
        {

        }

        void ListCustomersControl1_ReloadData(object sender, EventArgs e)
        {
            ListCustomersControl1.Show(SearchCustomerControl1.SearchEntity);
        }

        void SearchCustomerControl1_TranferData(object sender, OneParameterEventAgrs<SearchEntity> e)
        {
            ListCustomersControl1.Show(SearchCustomerControl1.SearchEntity);
        }
    }
}